#include <stdio.h>
#include <stdlib.h>
#include <math.h>
int main()
{
    long i, j, r = 500, count = 0;
    for (i = -r; i <= r; ++i)
        for (j = -r; j <= r; ++j)
            if (pow(i, 2) + pow(j, 2) <= pow(r, 2))
                ++count;
    double PI = count / pow(r, 2);
    printf("%f", PI);
    return 0;
}

